package com.six.library.model


/*-*- coding:utf-8 -*-
 * @Author  : debi
 * @Time    : 10/22/22
 * @Software: IntelliJ IDEA
 */
class ResultDataT<T> {
    var statusCode = 200
    var message: String = ""
    var data: T? = null
    fun setMsg(msg: String): ResultDataT<T> {
        this.message = msg
        return this
    }

    fun setData(data: T): ResultDataT<T> {
        this.data = data
        return this
    }


    fun setCode(code: Int): ResultDataT<T> {
        this.statusCode = code
        return this
    }
}

class ResultData {
    var statusCode = 200
    var message: String = ""
    var data: Any? = null

    fun setMsg(msg: String): ResultData {
        this.message = msg
        return this
    }

    fun setData(data: Any): ResultData {
        this.data = data
        return this
    }


    fun setCode(code: Int): ResultData {
        this.statusCode = code
        return this
    }

    override fun toString(): String {
        return "ResultData(statusCode=$statusCode, message='$message', data=$data)"
    }

}


val ResultInfo = ResultData()